package com.lightjet.macross.base.awf.domain;

import com.lightjet.macross.common.core.IntKeyBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Entity
@Table(name="BIZ_AGENT")
@Getter
@Setter
@NoArgsConstructor
@ApiModel(description = "流程任务代理实体表")
public class BizAgent extends IntKeyBaseEntity {

    //当事人ID
    @ApiModelProperty(value = "当事人ID")
    private String principalId;

    @Transient
    @ApiModelProperty(value = "当事人显示名")
    private String principalname;

    //代理人ID 当前版本只支持1对1授权 后续版本会考虑1对n授权
    @ApiModelProperty(value = "代理人ID ")
    private String agentId;

    @Transient
    @ApiModelProperty(value = "代理人ID显示名")
    private String agentname;

    //代理起始时间
    @ApiModelProperty(value = "代理起始时间")
    private Date starttime;

    //代理起始时间
    @ApiModelProperty(value = "代理起始时间文本显示")
    @Transient
    private String starttimetext;

    //代理结束时间
    @ApiModelProperty(value = "代理结束时间")
    private Date endtime;

    @ApiModelProperty(value = "代理结束时间")
    @Transient
    private String endtimetext;

    //启用状态
    @ApiModelProperty(value = "启用状态")
    private byte enable;

    //授权的流程key “*” 表示全部流程
    @ApiModelProperty(value = "授权的流程key “*” 表示全部流程 ")
    private String grantedprockey = "*";

    @Transient
    @ApiModelProperty(value = "授权的流程的描述名称")
    private String grantedprocname;

    //授权代理的原因
    @ApiModelProperty(value = "授权代理的原因")
    private String reason;

    //操作人ID
    @ApiModelProperty(value = "操作人ID")
    private String operId;

    @Transient
    @ApiModelProperty(value = "操作人显示名")
    private String opername;

    //备注
    @ApiModelProperty(value = "备注")
    private String memo;


    /* 更细节授权后期再实现

    //授权的流程key的节点key 即具体某个流程的某个特定节点 如果grantedprockey 为 "-" 则grantednodekey 必须为 "-"
    private String grantednodekey = "-";

    //授权的流程节点名称 "-" 表示不限
    private String grantednodename;

    */



}
